package com.spring.cloud.study.service;

import com.spring.cloud.study.entity.SysMenu;

import java.util.List;
import java.util.Map;

/**
 * Created with IntelliJ IDEA.
 * User: 齐丹枫
 * Date: 2018/3/7
 * Time: 14:09
 * To change this template use File | Settings | File Templates.
 * Description:
 */
public interface SysMenuService extends BaseService<SysMenu> {


    List<SysMenu> findMenuByUserName(String userName);

    List<SysMenu> getUserMenuPremission(String userName);


    List<SysMenu> findByParentId(int parentId);

    List<SysMenu> findByTypeIs(int type);

    List<SysMenu> getUserAllPremissionTreeList(String userName);

    List<SysMenu> getMenuTreeByRoleId(int roleId);

    void deleteBatchById(List<Integer> ids);

    List<SysMenu> setMenuTreeList(List<SysMenu> sysMenus, Map<Integer, List<SysMenu>> collect);

    List<SysMenu> generateMenuTree(List<SysMenu> sysMenus);
}